package com.trkj.service;

import com.trkj.dao.UnitDao;
import com.trkj.entity.UnitEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UnitImpl implements UnitService{
    @Autowired
    private UnitDao unitDao;
    @Override
    public List<UnitEntity> selectUnit(UnitEntity unitEntity) {
        return unitDao.selectUnit(unitEntity);
    }

    @Override
    public Boolean AddUnit(UnitEntity unitEntity) {
        return unitDao.AddUnit(unitEntity);
    }

    @Override
    public Boolean updateUnit(UnitEntity unitEntity) {
        return unitDao.updateUnit(unitEntity);
    }

    @Override
    public Boolean deleteUnit(int id) {
        return unitDao.deleteUnit(id);
    }

    //查询所有单元数量
    @Override
    public List<UnitEntity> UnitList(){
        return unitDao.UnitList();
    }
}
